Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
change default routing rule to all_to_main
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenmrev committed Jan 13, 2019
1 parent cef4877 commit 135f5b3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 27 deletions.
32 changes: 13 additions & 19 deletions V2RayX/AdvancedWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Gw
<rect key="frame" x="1" y="1" width="118" height="268"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="XPi-HC-KJg">
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="XPi-HC-KJg">
<rect key="frame" x="0.0" y="0.0" width="118" height="268"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
Expand Down Expand Up @@ -153,15 +153,15 @@ Gw
<rect key="frame" x="145" y="17" width="332" height="290"/>
<autoresizingMask key="autoresizingMask"/>
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="nNS-kZ-Fe2">
<rect key="frame" x="0.0" y="0.0" width="317" height="275"/>
<rect key="frame" x="0.0" y="0.0" width="332" height="290"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView ambiguous="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="u9b-6e-BFb">
<rect key="frame" x="0.0" y="0.0" width="317" height="275"/>
<rect key="frame" x="0.0" y="0.0" width="332" height="290"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="317" height="275"/>
<size key="minSize" width="332" height="290"/>
<size key="maxSize" width="332" height="10000000"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
<connections>
Expand All @@ -171,7 +171,7 @@ Gw
</subviews>
</clipView>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="WPy-9F-0mh">
<rect key="frame" x="317" y="0.0" width="15" height="275"/>
<rect key="frame" x="316" y="0.0" width="16" height="290"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
Expand Down Expand Up @@ -252,15 +252,9 @@ Gw
<segmentedCell key="cell" borderStyle="border" alignment="left" style="smallSquare" trackingMode="momentary" id="fnx-1v-MTC">
<font key="font" metaFont="system"/>
<segments>
<segment image="NSAddTemplate">
<nil key="label"/>
</segment>
<segment image="NSRemoveTemplate" tag="1">
<nil key="label"/>
</segment>
<segment width="402" enabled="NO">
<nil key="label"/>
</segment>
<segment image="NSAddTemplate"/>
<segment image="NSRemoveTemplate" tag="1"/>
<segment width="402" enabled="NO"/>
</segments>
</segmentedCell>
<connections>
Expand All @@ -282,7 +276,7 @@ Gw
<rect key="frame" x="1" y="1" width="112" height="321"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="wbH-CA-T9F">
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="wbH-CA-T9F">
<rect key="frame" x="0.0" y="0.0" width="112" height="321"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
Expand Down Expand Up @@ -419,7 +413,7 @@ Gw
<rect key="frame" x="1" y="1" width="85" height="228"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="VlQ-mV-pLn">
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" id="VlQ-mV-pLn">
<rect key="frame" x="0.0" y="0.0" width="85" height="228"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
Expand Down Expand Up @@ -498,15 +492,15 @@ Gw
<rect key="frame" x="109" y="104" width="217" height="137"/>
<autoresizingMask key="autoresizingMask"/>
<clipView key="contentView" ambiguous="YES" drawsBackground="NO" copiesOnScroll="NO" id="RDn-zh-dIS">
<rect key="frame" x="0.0" y="0.0" width="202" height="137"/>
<rect key="frame" x="0.0" y="0.0" width="217" height="137"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView ambiguous="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" spellingCorrection="YES" smartInsertDelete="YES" id="1mD-il-bEM">
<rect key="frame" x="0.0" y="0.0" width="202" height="137"/>
<rect key="frame" x="0.0" y="0.0" width="217" height="137"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="202" height="137"/>
<size key="minSize" width="217" height="137"/>
<size key="maxSize" width="240" height="10000000"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
<connections>
Expand Down
5 changes: 1 addition & 4 deletions V2RayX/AdvancedWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
#import "AdvancedWindowController.h"
#import "MutableDeepCopying.h"
#include <stdio.h>
#include <unistd.h> // notice this! you need it!

#define RULEINFO (@"When an")

@interface AdvancedWindowController () {
ConfigWindowController* configWindowController;
Expand Down Expand Up @@ -322,7 +319,7 @@ - (IBAction)addRemoveRuleSet:(id)sender {
NSAlert* alert = [NSAlert alertWithMessageText:@"Do you want to reset rule sets to original three ones?" defaultButton:@"OK" alternateButton:@"Cancel" otherButton:nil informativeTextWithFormat:@""];
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
if (returnCode == NSModalResponseOK) {
self->_routingRuleSets = [@[ROUTING_DIRECT, ROUTING_GLOBAL, ROUTING_BYPASSCN_PRIVATE_APPLE] mutableDeepCopy];
self->_routingRuleSets = [@[ROUTING_GLOBAL, ROUTING_BYPASSCN_PRIVATE_APPLE, ROUTING_DIRECT] mutableDeepCopy];
NSUInteger originalIndex = self->_ruleSetTable.selectedRow;
[self->_ruleSetTable selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO]; // toggle
if (originalIndex == self->_ruleSetTable.selectedRow) {
Expand Down
4 changes: 2 additions & 2 deletions V2RayX/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ - (void)readDefaults {
}
}

_routingRuleSets = [@[ROUTING_GLOBAL, ROUTING_DIRECT, ROUTING_BYPASSCN_PRIVATE_APPLE] mutableDeepCopy];
_routingRuleSets = [@[ROUTING_GLOBAL, ROUTING_BYPASSCN_PRIVATE_APPLE, ROUTING_DIRECT] mutableDeepCopy];
if ([[defaults objectForKey:@"routingRuleSets"] isKindOfClass:[NSArray class]] && [[defaults objectForKey:@"routingRuleSets"] count] > 0) {
_routingRuleSets = [[defaults objectForKey:@"routingRuleSets"] mutableDeepCopy];
}
Expand Down Expand Up @@ -285,7 +285,7 @@ - (void) writeDefaultSettings {
],
@"cusProfiles": @[],
@"enableRestore": @NO,
@"routingRuleSets": @[ROUTING_DIRECT, ROUTING_GLOBAL, ROUTING_BYPASSCN_PRIVATE_APPLE],
@"routingRuleSets": @[ROUTING_GLOBAL, ROUTING_BYPASSCN_PRIVATE_APPLE, ROUTING_DIRECT],
};
for (NSString* key in [defaultSettings allKeys]) {
[[NSUserDefaults standardUserDefaults] setObject:defaultSettings[key] forKey:key];
Expand Down
4 changes: 2 additions & 2 deletions V2RayX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1235</string>
<string>1251</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down

0 comments on commit 135f5b3

Please sign in to comment.